package hu.arnoldfarkas.camel.dropbox;

import com.dropbox.core.DbxAuthFinish;
import com.dropbox.core.DbxClient;
import com.dropbox.core.DbxRequestConfig;
import java.util.Locale;

public class DropboxClientFactory {

    private final DbxAuthFinish authFinish;

    public DropboxClientFactory(String userId, String accessToken) {
        authFinish = new DbxAuthFinish(accessToken, userId, null);
    }

    public DbxClient getClient() {
        DbxRequestConfig config = new DbxRequestConfig("AbsolutelyUselessString/1.0", Locale.ENGLISH.toString());
        return new DbxClient(config, authFinish.accessToken);
    }
}
